#10.4子图 
#判断图、子图、真子图、生成子图、导出子图
import _00GraphFuc as gf

V={'a','c','b','d','e'}
E={('b','c'),('a','c'),('a','b'),('a','d'),('a','e'),('b','d'),('c','d'),('c','e'),('b','e'),('d','e')}
tv=gf.isgraph(V,E)
gf.drawgraph(E)
print("判断图",tv)
Vs={'a','b','c','d','e'}
Es={('b','c'),('a','c'),('a','b'),('a','d'),('a','e'),('b','d'),('c','e'),('b','e'),('d','e')}
tv=gf.issubgragh(V,E,Vs,Es)
gf.drawgraph(Es)
print("判断子图",tv)
tv=gf.ispropersubgraph(V,E,Vs,Es)
print("判断子图",tv)
gf.drawgraph(Es)
Vs={'a','c','b','d','e'}
Es={('a','d'),('c','e'),('b','e'),('a','c'),('b','d')}
tv=gf.isspanningsubgraph(V,E,Vs,Es)
gf.drawgraph(Es)
print("判断生成子图",tv)
Vs={'a','c','b','e'}
Es={('b','c'),('a','b'),('a','c'),('a','e'),('c','e'),('b','e')}
tv=gf.isinducedsubgraph(V,E,Vs,Es)
gf.drawgraph(Es)
print("判断导出子图",tv) 